#include "adc_get.h"
#include "dma.h"
#include "adc.h"

DMA dma={0};
uint32_t num[3]={0};
uint32_t	sum[3]={0};

void adc_get(void)
{
//	HAL_ADC_Start_DMA(&hadc1,(uint32_t *)num,12);
	for(uint8_t i=0;i<10;i+=3)
	{
		sum[0]+=num[i];
		sum[1]+=num[i+1];
		sum[2]+=num[i+2];
	}
	dma.power1=sum[0]/4;
	dma.power2=sum[1]/4;
	dma.power3=sum[2]/4;
}

